package com.deng.spring.myapp;

import com.deng.spring.myapp.entity.User;
import com.deng.spring.myapp.service.IOrderService;
import com.deng.spring.myapp.service.IUserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author 邓力宾
 * @date 2020/5/21 下午4:06
 * @desc
 */
public class Main {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);

		IUserService userService = context.getBean(IUserService.class);
		User user = userService.getById(1);
		System.out.println(user.toString());
		IOrderService orderService = context.getBean(IOrderService.class);
		orderService.showOrder();

	}
}
